package cn.swust.designpatternlearningplatform.dao;

import cn.swust.designpatternlearningplatform.dao.sql.AboutDaoSql;
import cn.swust.designpatternlearningplatform.domain.entity.About;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface AboutDao {
    @InsertProvider(type = AboutDaoSql.class,method = "add")
    void add(About about);

   @UpdateProvider(type = AboutDaoSql.class,method = "update")
    void update(About about);

   @DeleteProvider(type = AboutDaoSql.class,method = "delete")
    void delete(Integer integer);
   @Results(value = {
           @Result(property = "id",column = "id"),
           @Result(property = "nav",column = "nav"),
           @Result(property = "title",column = "title"),
           @Result(property = "content",column = "content"),
           @Result(property = "time",column = "time"),
           @Result(property = "isFront",column = "is_front"),

   })
    @SelectProvider(type = AboutDaoSql.class,method = "selectAll")
    List<About> selectAll();
}
